#ifndef MATRIX4X4_H
#define MATRIX4X4_H

#include "../vectors.h"

#define PI 3.1415f

inline float ToRad(float x){return x*PI/180.0f;}
inline float ToDeg(float x){return x*180.0f/PI;}

class Matrix4x4
{
	private:
		float fvMatrix[4][4];
	public:
		Matrix4x4* operator*=(float fvMul[16]);
		Matrix4x4* operator*=(float fvMul[4][4]);
		Matrix4x4* operator*=(Matrix4x4 mat);

		Matrix4x4* Identity();

		Matrix4x4* Projection(float fFov, float fWidth, float fHeight, float fFront, float fBack);

		Matrix4x4* Translate(float x, float y, float z);
		Matrix4x4* Translate(Vector3 vecTranslation);

		Matrix4x4* Scale(float x, float y, float z);
		Matrix4x4* Scale(float fScale);

		Matrix4x4* Rotate(float x, float y, float z);

		Matrix4x4* Look(float x, float y, float z, float atX, float atY, float atZ);

        void Set(float fvMatrix[16]);
        void Set(float fvMatrix[4][4]);
		void Set(int nLine, int nColumn, float fValue);

		float operator()(int nLine, int nColumn); //returns value from (x, y) point

		float* GetTab();
};

#endif
